set_property PACKAGE_PIN Y9 [get_ports clk]

# define clk associated pin as a clock source with 100 MHz
create_clock -period 10.000 -name clk [get_ports clk]

# User LEDs - Bank 33
set_property PACKAGE_PIN T22 [get_ports {led[0]}]
set_property PACKAGE_PIN T21 [get_ports {led[1]}]
#set_property PACKAGE_PIN U22 [get_ports {led[2]}];  # "LD2"
#set_property PACKAGE_PIN U21 [get_ports {led[3]}];  # "LD3"
#set_property PACKAGE_PIN V22 [get_ports {led[4]}];  # "LD4"
#set_property PACKAGE_PIN W22 [get_ports {led[5]}];  # "LD5"
#set_property PACKAGE_PIN U19 [get_ports {led[6]}];  # "LD6"
#set_property PACKAGE_PIN U14 [get_ports {led[7]}];  # "LD7"

# User Push Buttons - Bank 34
set_property PACKAGE_PIN P16 [get_ports {apply[1]}];  # "BTNC"
#set_property PACKAGE_PIN R16 [get_ports {BTND}];  # "BTND"
set_property PACKAGE_PIN N15 [get_ports {apply[0]}];  # "BTNL"
set_property PACKAGE_PIN R18 [get_ports {apply[2]}];  # "BTNR"
set_property PACKAGE_PIN T18 [get_ports {reset}];  # "BTNU"

# User DIP Switches - Bank 35
set_property PACKAGE_PIN F22 [get_ports {inject[0]}]
set_property PACKAGE_PIN G22 [get_ports {mode[0]}]
set_property PACKAGE_PIN F21 [get_ports {inject[1]}]
set_property PACKAGE_PIN H19 [get_ports {mode[1]}]
set_property PACKAGE_PIN H17 [get_ports {inject[2]}]
set_property PACKAGE_PIN M15 [get_ports {mode[2]}]

set_property IOSTANDARD LVCMOS33 [get_ports -of_objects [get_iobanks 33]]
set_property IOSTANDARD LVCMOS18 [get_ports -of_objects [get_iobanks 34]]
set_property IOSTANDARD LVCMOS18 [get_ports -of_objects [get_iobanks 35]]
set_property IOSTANDARD LVCMOS33 [get_ports -of_objects [get_iobanks 13]]

# sets: dont_touch, exclude_placement, contain_routing
set_property HD.RECONFIGURABLE TRUE [get_cells [list tmr_inst]]

# define a new pblock
create_pblock pblock_counters

# add hierarchical modules to the pblock
add_cells_to_pblock [get_pblocks pblock_counters] [get_cells [list tmr_inst]]

# define the size and components within the pblock
resize_pblock [get_pblocks pblock_counters] -add {SLICE_X106Y99:SLICE_X113Y50}
resize_pblock [get_pblocks pblock_counters] -add {RAMB18_X5Y39:RAMB18_X5Y20}
resize_pblock [get_pblocks pblock_counters] -add {RAMB36_X5Y19:RAMB36_X5Y10}

set_property RESET_AFTER_RECONFIG true [get_pblocks pblock_counters]
